#include <stdio.h>
#include <string.h>
int  LowerCase(char str[]);
int main()
{  	 		  		 
    char  str[20];
    int count;
    printf("Input a word:\n");
    gets(str);//1
    count = LowerCase(str);//1
    printf("%s\n", str);
    printf("%d\n", count);
    return 0;
}  	 		  		 
int  LowerCase(char str[])
{  	 		  		 
    int i, count = 0;//1
    for (i=0; str[i]!='\0'; i++)//1
    {  	 		  		 
        if (str[i]>='A' && str[i]<='Z')//1
        {  	 		  		 
            str[i] = str[i] + 'a' - 'A';//1
            count++;//1
        }
    }
    return count;//1
}